package com.shivandragon;

import org.bson.types.ObjectId;

import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBObject;
import com.shivandragon.utils.MongoSingletonHolder;

public class Test {

	public static void main(String[] args) {
		DBCollection col = MongoSingletonHolder.getInstance().getPresentationsDBCollection();
		ObjectId id = new ObjectId("535e577dba817a0ab9b65e30");
		String idStr = id.toStringMongod();
		System.out.println(idStr);
		
		DBObject dbObject = new BasicDBObject();
		dbObject.put("$set", new BasicDBObject("f1", "v11"));
		
		col.update(new BasicDBObject("_id", id), dbObject, true, false);
	}
}
